<style scoped>
.expand-row {
  margin-bottom: 16px;
  text-align: center;
}

.expand-row:last-child {
  margin-bottom: 0;
}

.first-expand-row {
  font-size: 14px;
  font-weight: bold;
}
</style>
<template>
  <div>
    <Row class="expand-row first-expand-row">
      <Col span="8">
      <span class="expand-key">离线时间</span>
      </Col>
      <Col span="8">
      <span class="expand-key">上线时间</span>
      </Col>
      <Col span="8">
      <span class="expand-key">离线时长 </span>
      </Col>
    </Row>
    <Row
      class="expand-row"
      v-for="(item,index) in row.lineTimeList || []"
      :key="index"
    >
      <Col span="8">
      <span class="expand-key">{{formatTime(item.offlineTime)}}</span>
      </Col>
      <Col span="8">
      <span class="expand-key">{{formatTime(item.onlineTime)}}</span>
      </Col>
      <Col span="8">
      <span class="expand-key">{{item.useTime}}</span>
      </Col>
    </Row>

  </div>
</template>
<script>
export default {
  props: {
    row: {
      type: Object,
      default: {}
    }
  },
  methods: {
    formatTime(time) {
      if (!time) return "-";
      return this.moment(time).format("YYYY-MM-DD HH:mm:ss");
    }
  }
};
</script>
